package com.zhiyou100.servicrImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.mapper.hospitalInfo.HouInforMapper;
import com.zhiyou100.model.HospitalInfor;
import com.zhiyou100.service.HouInforService;
@Service
public class HouInforServiceImpl implements HouInforService{
	@Autowired
	private HouInforMapper mapper;
	@Override
	public List<HospitalInfor> findAll(Map<String, Object> map) {
		List<HospitalInfor> lists = mapper.findAll(map);
		return lists;
	}
	// 详情
	@Override
	public HospitalInfor findById(int medical_record) {
		HospitalInfor hos = mapper.findById(medical_record);
		return hos;
	}
	// 添加
	@Override
	public void addHospital(HospitalInfor hos) {
		mapper.addHospital(hos);
		
	}
	@Override
	public void addHospital2(HospitalInfor hos) {
		mapper.addHospital2(hos);
		
	}
	// 更新
	@Override
	public HospitalInfor findToEdit(int medical_record) {
		HospitalInfor his = mapper.findToEdit(medical_record);
		return his;
	}
	// 更新 更改
	@Override
	public void editHospital(HospitalInfor hos) {
		mapper.editHospital(hos);
		
	}
	@Override
	public void editHospital2(HospitalInfor hos) {
		mapper.editHospital2(hos);
		
	}
	// 删除
	@Override
	public void deleteById(int medical_record) {
		mapper.deleteById(medical_record);
		
	}
	// 出院
	@Override
	public void updateById(int medical_record) {
		mapper.updateById(medical_record);
		
	}

}
